package com.oocl.euc.core.builder;

import com.oocl.euc.common.constant.ProceduresType;
import com.oocl.euc.core.requestform.model.RequestProcedures;
import org.springframework.stereotype.Component;

@Component
public class RequestProceduresBuilder {

    private RequestProcedures requestProcedures;

    public RequestProceduresBuilder defaultBuilder() {

        requestProcedures = new RequestProcedures();
        requestProcedures.setProcedureDesc("Request Procedure Desc");
        requestProcedures.setProcedureSeq(0);
        requestProcedures.setTaskRemark("Task Remark");
        requestProcedures.setProcedureType(ProceduresType.TYPE_WORKING);
        requestProcedures.setHandledBy("zhousk");
        return this;
    }

    public RequestProceduresBuilder withProcedureSeq(int procedureSeq){

        this.requestProcedures.setProcedureSeq(procedureSeq);
        return this;
    }

    public RequestProceduresBuilder withProcedureDesc(String procedureDesc){

        this.requestProcedures.setProcedureDesc(procedureDesc);
        return this;
    }

    public RequestProceduresBuilder withProcedureType(String procedureType){

        this.requestProcedures.setProcedureType(procedureType);
        return this;
    }

    public RequestProceduresBuilder withTaskRemark(String taskRemark){

        this.requestProcedures.setTaskRemark(taskRemark);
        return this;
    }

    public RequestProcedures create(){
        return this.requestProcedures;
    }
}
